<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateProductbacklogTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            
                
            
             <h:panelGroup id="procrmessagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <a4j:outputPanel id="productbackloginterface">
            <c:if test="#{entityDependenceService.entitySatisfied('productbacklog')}">
                <table>
                    <td>
               <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateProductbacklogLabel_scrumprojekt}" for="scrumprojekt" />
                    <h:selectOneMenu id="scrumprojekt" value="#{productbacklogController.selected.scrumprojekt}" title="#{bundle.CreateProductbacklogTitle_scrumprojekt}" >
                        <f:selectItems value="#{scrumprojektController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateProductbacklogLabel_backlogbezeichnung}" for="backlogbezeichnung" />
                    <h:inputText id="backlogbezeichnung" value="#{productbacklogController.selected.backlogbezeichnung}" title="#{bundle.CreateProductbacklogTitle_backlogbezeichnung}" required="true" requiredMessage="#{bundle.CreateProductbacklogRequiredMessage_backlogbezeichnung}"/>
                    <h:outputLabel value="#{bundle.CreateProductbacklogLabel_backlogbeschreibung}" for="backlogbeschreibung" />
                    <h:inputText id="backlogbeschreibung" value="#{productbacklogController.selected.backlogbeschreibung}" title="#{bundle.CreateProductbacklogTitle_backlogbeschreibung}" />
                    <h:outputLabel value="#{bundle.CreateProductbacklogLabel_backlogbeginn}" for="backlogbeginn" />
                    <rich:calendar id="backlogbeginn" value="#{productbacklogController.selected.backlogbeginn}" title="#{bundle.CreateProductbacklogTitle_backlogbeginn}" required="true" requiredMessage="#{bundle.CreateProductbacklogRequiredMessage_backlogbeginn}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </rich:calendar>
                    <h:outputLabel value="#{bundle.CreateProductbacklogLabel_backlogende}" for="backlogende" />
                    <rich:calendar id="backlogende" value="#{productbacklogController.selected.backlogende}" title="#{bundle.CreateProductbacklogTitle_backlogende}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </rich:calendar>
                </h:panelGrid>
                <br />
                <a4j:commandButton render="backlogpanel" action="#{productbacklogController.create}" value="#{bundle.CreateProductbacklogSaveLink}" />
            </h:form>
                
                <a4j:commandButton render="backlogpanel" value="Aktualisieren"/>
                <a4j:outputPanel id="backlogpanel">
                    #{productbacklogController.recreateModel()}
                 <ui:include src="List.xhtml" />
                </a4j:outputPanel>
                    </td>
                    <td>
                        <a4j:outputPanel id="backlogeditpanel">
                            <ui:include src="Edit.xhtml" />
                        </a4j:outputPanel>
                    </td>
                </table>
           </c:if>
           <c:if test="#{entityDependenceService.entitySatisfied('productbacklog') eq false}">
                Kein Scrum Projekt vorhanden, bevor Sie Productbacklogs anlegen und oder bearbeiten wollen müssen Sie ein Scrum Projekt anlegen.
                <a4j:commandButton render="productbackloginterface" value="aktualisieren"/>
            </c:if>
                </a4j:outputPanel>
        </ui:define>
    </ui:composition>

</html>
